from Artear.modeller import Modeller


data_sources = {
    'preset': r"B:\muse_repo\Presets\_Legacy",
    'midi': r"B:\muse_repo\MIDI",
    'pickled_data': r"/media/dajun/000EFE5F000190F2/dev_spa/DMuse/data.pickled",
}

config = {
    'model_type': 'params2params',
    'plugin_path': 'C:/VstPlugins/64bit/Sylenth1.dll',
    'duration': 2.,
    'source_sample_rate': 4410.,
    'compress_rate': 200.,
    'bpm': 120.,
}

print('正在创建模型')
modeller = Modeller(backend='keras', batch_size=4, **data_sources)
print('正在读取数据')
modeller.read_data(**config)
print('开始训练')
modeller.train(steps=100, enable_validation=True, show_summary=True)
# modeller.train(steps=100, enable_validation=True, show_summary=True, server=('127.0.0.1', 24017))
